package javaClassExercise;

/**
 * Created by lomo on 2017/3/13.
 */

class Aa {
    public Aa() {
        System.out.println("Aa() !");
    }
}

class Bb extends Aa {
    public Bb(int a) {
        System.out.println("Bb() !" + a);
    }

    protected void BbT() {
        System.out.println("Bb Class' BbT 方法.");
    }
}

public class extendsTests extends Bb{
    public extendsTests(int a) {
        super(a);
        System.out.println("extendsTests() !" + a);
    }

    @Override
    public void BbT() {
        System.out.println("extendsTests 类重写父类Bb的protected的BbT方法！了");
    }

    public static void main(String[] args) {
        new extendsTests(1);

        new extendsTests(2).BbT();

        new Bb(3).BbT();
    }
}
